#ifndef MINWIN_H
#define MINWIN_H

#define TRUE 1
#define FALSE 0

#include "stddef.h"
#include "stdint.h"

typedef void *HANDLE;
typedef void *HWND;
typedef void *HMENU;
typedef void *HICON;
typedef void *HCURSOR;
typedef void *HBRUSH;
typedef void *HINSTANCE;
typedef void *HGDIOBJ;
typedef void *HGLRC;
typedef void *HMODULE;
typedef void *HDC;
typedef void *LPVOID;

#define DECLARE_HANDLE(name) typedef HANDLE name

typedef uint16_t WORD;
typedef uint16_t ATOM;

typedef int32_t LONG;
typedef size_t SIZE_T;
typedef ssize_t SSIZE_T;

typedef int64_t LONG_PTR;
typedef int64_t LPARAM;
typedef int64_t LRESULT;

typedef uint32_t DWORD;
typedef uint32_t UINT;
typedef int32_t INT;

typedef uint64_t UINT_PTR;
typedef uint64_t WPARAM;

typedef int BOOL;

typedef uint8_t BYTE;
typedef int8_t CHAR;

typedef float FLOAT;

typedef DWORD COLORREF;
typedef DWORD* LPCOLORREF;

typedef int32_t INT32;
typedef int64_t INT64;
typedef unsigned short USHORT;

#define VOID void

#define WINAPI __stdcall
#define CALLBACK __stdcall

#define MAKEINTRESOURCE(x) (LPTSTR)(x)

#define LOWORD(X) (X & 0xff)
#define HIWORD(X) (X >> 16)

typedef LRESULT CALLBACK (*WNDPROC)(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

typedef int (WINAPI * FARPROC)();
typedef int (WINAPI * PROC)();

typedef uint16_t WCHAR;
typedef const int8_t *LPCSTR;
typedef const int8_t *LPSTR;

#ifdef UNICODE
typedef const wchar_t *LPCTSTR;
typedef wchar_t *LPTSTR;
#else
typedef const char *LPCTSTR;
typedef char *LPTSTR;
#endif

typedef struct _POINTFLOAT {
	FLOAT x;
	FLOAT y;
} POINTFLOAT, *LPPOINTFLOAT;

typedef struct _RECT {
	LONG left;
	LONG top;
	LONG right;
	LONG bottom;
} RECT, *LPRECT;

typedef struct tagPOINT {
	LONG x;
	LONG y;
} POINT, *PPOINT;

#endif
